package com.itany.corejava.day04;

import java.util.Scanner;

public class Test4 {

    public static void main(String[] args) {

        Scanner sc=new Scanner(System.in);

        int n=sc.nextInt();

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                System.out.print("*");
            }
            System.out.println();
        }

        System.out.println("------------------------------------");


        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                if(i==0||i==n-1||j==0||j==n-1) {
                    System.out.print("*");
                }else{
                    System.out.print(" ");
                }
            }
            System.out.println();
        }

        System.out.println("------------------------------------");


        for (int i = 0; i < n; i++) {
            for (int j = 0; j < i+1; j++) {
                System.out.print("*");
            }
            System.out.println();
        }

        System.out.println("------------------------------------");


        for (int i = 0; i < n; i++) {
            for (int j = 0; j < i+1; j++) {
                if(i==0||i==n-1||j==0||j==i) {
                    System.out.print("*");
                }else{
                    System.out.print(" ");
                }
            }
            System.out.println();
        }

        System.out.println("------------------------------------");

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n - i - 1; j++) {
                System.out.print(" ");
            }
            for (int j = 0; j < 2*i+1; j++) {
                System.out.print("*");
            }
            System.out.println();
        }

        System.out.println("------------------------------------");

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n - i - 1; j++) {
                System.out.print(" ");
            }
            for (int j = 0; j < 2*i+1; j++) {
                if(i==0||i==n-1||j==0||j==2*i) {
                    System.out.print("*");
                }else{
                    System.out.print(" ");
                }
            }
            System.out.println();
        }


        System.out.println("------------------------------------");


        for (int i = -n; i <= n; i++) {
            for (int j = 0; j < Math.abs(i); j++) {
                System.out.print(" ");
            }
            for (int j = 0; j < (n - Math.abs(i)) * 2 + 1; j++) {
                System.out.print("*");
            }
            System.out.println();
        }

        System.out.println("------------------------------------");



        for (int i = -n; i <= n; i++) {
            for (int j = 0; j < Math.abs(i); j++) {
                System.out.print(" ");
            }
            for (int j = -(n-Math.abs(i)); j <= (n-Math.abs(i)); j++) {
                System.out.print("*");
            }
            System.out.println();
        }

        System.out.println("------------------------------------");



        for (int i = -n; i <= n; i++) {
            for (int j = 0; j < Math.abs(i); j++) {
                System.out.print(" ");
            }
            for (int j = -(n-Math.abs(i)); j <= (n-Math.abs(i)); j++) {
                if(i==-n||i==n||j==-(n-Math.abs(i))||j==(n-Math.abs(i))) {
                    System.out.print("*");
                }else{
                    System.out.print(" ");
                }
            }
            System.out.println();
        }

        System.out.println("------------------------------------");



        for (int i = -n; i <= n; i++) {
            if(i==0){
                continue;
            }

            for (int j = 0; j < Math.abs(i)-1; j++) {
                System.out.print(" ");
            }
            for (int j = -(n-Math.abs(i)); j <= (n-Math.abs(i)); j++) {
                System.out.print("*");
            }
            System.out.println();
        }


    }
}
